import Vuex from 'vuex'
import Vue from 'vue'
Vue.use(Vuex)
const actions = {
        jia(ministore,value){
            ministore.commit('JIA',value)
        },
        jian(ministore,value){
            ministore.commit('JIAN',value)
        }
}
const mutations = {
        JIA(store,value){
            store.sum += value
        },
        JIAN(store,value){
            store.sum -= value
        }
}
const state = {
    sum:0
}
export default new Vuex.Store({
    actions,
    mutations,
    state
})